//
//  LzwTwoTableViewCell.m
//  NewHalfsugar
//
//  Created by 刘志武 on 15/12/31.
//  Copyright © 2015年 刘志武. All rights reserved.
//

#import "LzwTwoTableViewCell.h"
#import "LzwBaseLable.h"
#import "LzwBaseScrollView.h"
#import "LzwBaseButton.h"
@interface LzwTwoTableViewCell ()


@property (nonatomic, retain) LzwBaseLable *myTwoLable;

@property (nonatomic, retain) LzwBaseButton *button;

@property (nonatomic, retain) UIScrollView *myScrollView;

@end

@implementation LzwTwoTableViewCell

-(void)dealloc{
    
    [_arrayT release];
    [_myTwoLable release];
    [_myScrollView release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        [self creatView];
    }
    return self;
}

- (void)creatView{
    
    
    
    self.myScrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 375 * WIDTH, 50 * WIDTH)];
    self.myScrollView.showsHorizontalScrollIndicator = NO;
    self.myScrollView.bounces = NO;
    self.myScrollView.contentSize = CGSizeMake(3.2 * 375 * WIDTH, 0);
    [self.contentView addSubview:self.myScrollView];
  
    
}

-(void)setArrayT:(NSMutableArray *)arrayT{
    
    if (_arrayT != arrayT) {
        
        [_arrayT release];
        
        _arrayT = [arrayT retain];
        
    }
//    
//    for (int i = 0 ; i < self.arrayT.count; i ++) {
//        
//        LzwTwoModle *modle = [self.arrayT objectAtIndex:i];
//        
//        
//        self.button = [LzwBaseButton buttonWithType:UIButtonTypeCustom];
//        self.button.tag = 1000 + i;
//        self.button.frame = CGRectMake(10 + (75 + 10) * i, 15, 75, 25);
////        self.button.backgroundColor = [UIColor yellowColor];
//        [self.contentView addSubview:self.button];
//        
//        [self.button setTitle:modle.title forState:UIControlStateNormal];
//        //设置文字大小
//        self.button.titleLabel.font = [UIFont systemFontOfSize:15];
//        
//        self.button.contentEdgeInsets = UIEdgeInsetsMake(0, 2, 0, 0);
//        
//        [self.button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
//        
//        //添加按钮事件
//         [self.button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
//        
//        [self.myScrollView addSubview:self.button];
//        
//    }
    
    
   
    
    
    
}


- (void)buttonAction:(UIButton *)buton{
    
    if (buton.tag == 1000) {
        NSLog(@"点第一个");
    }else{
        NSLog(@"别瞎点");
    }
    
}
@end
